<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8"/>
    <link href="css/themes/default/easyui.css" rel="stylesheet"/>
    <link href="css/themes/icon.css" rel="stylesheet"/>
    <link href="css/themes/color.css" rel="stylesheet"/>
    <link href="css/apply.css" rel="stylesheet"/>
    <script src="script/jquery.min.js"></script>
    <script src="script/jquery.easyui.min.js"></script>
    <title>修改订单</title>
    <style>
    </style>
</head>
<body>
<script>
    var statusName = ["已删除", "待收取", "在库中", "运输中", "司机取件"]
</script>
<c:forEach items="${waybill}" var="waybill">
    <form action="updateWaybill.do" method="get">
        <div class="server">
            <h3 class="apply_title">修改订单</h3>
            <table class="table">

                <tr>
                    <td class="first">快递编号:</td>
                    <td class="input"><input type="text" name="waybill_no" value="${waybill.waybillNo}" readonly/></td>
                </tr>
                <tr>
                    <td colspan="6" class="head">寄件人信息</td>
                </tr>
                <tr>

                    <td class="first">寄件人：</td>
                    <td class="input"><input type="text" name="sender_name" value="${waybill.senderName}"/></td>
                    <td class="first">手机：</td>
                    <td class="input"><input type="text" name="sender_phone" value="${waybill.senderPhone}"/></td>
                    <td class="first">地址：</td>
                    <td class="input"><input type="text" name="sender_address" value="${waybill.senderAddress}"/></td>
                </tr>
                <tr>
                    <td colspan="6" class="head">收件人信息</td>
                </tr>

                <tr>
                    <td class="first">收件人<span class="xing">*</span>：</td>
                    <td class="input"><input type="text" name="recipient_name" value="${waybill.recipientName}"/></td>
                    <td class="first">手机<span class="xing">*</span>：</td>
                    <td class="input"><input type="text" name="recipient_phone" value="${waybill.recipientPhone}"/></td>
                    <td class="first">地址：</td>
                    <td class="input"><input type="text" name="recipient_address" value="${waybill.recipientAddress}"/>
                    </td>
                </tr>
                <tr>
                    <td colspan="6" class="head">快递信息</td>
                </tr>
                <tr>
                    <td class="first">收费价格<span class="xing">*</span>：</td>
                    <td class="input">
                        <input type="text" id="mai_cost" name="mail_cost" value="${waybill.mailCost}">
                    </td>
                    <td class="first">快递类型<span class="xing">*</span>：</td>
                    <td class="input">
                        <select id="mail_type" name="mail_type">
                            <option value="1">日用品</option>
                            <option value="2">衣物</option>
                            <option value="3">文件</option>
                            <option value="4">蔬果</option>
                        </select>
                    </td>
                    <td class="first">快递状态<span class="xing">*</span>：</td>
                    <td class="input">
                        <input type="text" id="status" name="status" readonly>
                    </td>
                </tr>

                <tr>
                    <td colspan="6" style="height:40px;">
                        <input type="submit" value="修改" class="easyui-linkbutton c1" style="width:50px;">
                    </td>
                </tr>
            </table>
        </div>
        <script>
            $("#mail_type").val("${waybill.mailType}")
            <%--alert(${waybill.mailType})--%>
            <%--$("#mailType").find("option:contains(${waybill.mailType})").attr("selected",true);--%>
            $("#status").val(statusName[${waybill.status}])
        </script>
    </form>
</c:forEach>
</body>

</html>